<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>项目评审专家管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnImport").click(function(){
				$.jBox($("#importBox").html(), {title:"导入数据", buttons:{"关闭":true}, 
					bottomText:"导入文件不能超过5M，仅允许导入“xls”或“xlsx”格式文件！"});
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<div id="importBox" class="hide">
		<form id="importForm" action="${ctx}/zx/expertsInfo/import" method="post" enctype="multipart/form-data"
			class="form-search" style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入，请稍等...');"><br/>
			<input id="uploadFile" name="file" type="file" style="width:330px"/><br/><br/>　　
			<input id="btnImportSubmit" class="btn btn-primary" type="submit" value="   导    入   "/>
			<a href="${ctx}/zx/expertsInfo/import/template">下载模板</a>
		</form>
	</div>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/zx/proExperts/">项目列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="lzd" action="${ctx}/zx/proExperts/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li>
				<label>项目编号：</label>
				<form:input path="proNo" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li>
				<label>项目分类：</label>
				<sys:treeselect id="cgml" name="cgml.id" value="${lzd.cgml.id}" labelName="cgml.name" labelValue="${lzd.cgml.name}"
					title="项目具体分类" url="/zx/cgml/treeData" cssClass="required" />
			</li>
			<li>
				<label>关键字：</label>
				<form:input path="remarks" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li class="clearfix"></li>
			<li>
				<label>项目名称：</label>
				<form:input path="proName" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li>
				<label>项目具体分类：</label>
				<sys:treeselect id="keyword" name="keyword.id" value="${lzd.keyword.id}" labelName="keyword.name" labelValue="${lzd.keyword.name}"
					title="项目具体分类" url="/zx/keyword/treeData" cssClass="required" />
			</li>
			<li>
				<label>支付状态：</label>
				<form:select path="payCount" cssStyle="width: 177px;">
					<form:option value="" htmlEscape="false">请选择</form:option>
					<form:option value="1" htmlEscape="false">未支付</form:option>
					<form:option value="2" htmlEscape="false">已支付</form:option>
				</form:select>
			</li>
			<li class="btns">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
				<input id="btnImport" class="btn btn-primary" type="button" value="导入"/>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				
				<th>项目名称</th>
				<th>项目编号</th>
				<!-- <th>项目类型</th> -->
				<th>开标时间</th>
				<th>项目执行人</th>
				<th>项目负责人</th>
				<th>招标方式</th>
				<th>预算金额(<font style="color: red">万元</font>)</th>
				<th>专家付费</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="lzd">
			<tr>
				<td title="${lzd.proName}">
					${fns:abbr(lzd.proName, 60)}
					<span class="label label-success" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${lzd.ts.sectionName}</span>
					<c:choose>
						<c:when test="${lzd.isSubpackage eq '1'}">
							<c:if test="${lzd.ts.trashPro eq '0'}">
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">废标</span>
							</c:if>
							<c:if test="${not empty lzd.ts.resetSectionId}">
								<span class="label label-info" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${lzd.ts.restartCount}次</span>
							</c:if>
						</c:when>
						<c:otherwise>
							<c:if test="${lzd.trashPro eq '0'}">
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">废标</span>
							</c:if>
							<c:if test="${not empty lzd.resetLzdId}">
								<span class="label label-info" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${lzd.restartCount}次</span>
							</c:if>
						</c:otherwise>
					</c:choose>	
				</td>
				<td> 
					${lzd.proNo}
				</td>
				<%-- <td>
					${lzd.cgml.name}
				</td> --%>
				<td>
					<fmt:formatDate value="${lzd.bidOpenDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${lzd.proPerformer}
				</td>
				<td>
					${lzd.proPic}
				</td>
				<td>
					${fns:getDictLabel(lzd.tenderWay, 'tender_way', '无')}
				</td>
				<td>
					<fmt:formatNumber value="${lzd.isSubpackage eq '1' ? lzd.ts.budgetMoney : lzd.budgetMoney}" type="currency" pattern="￥.000000"/>
				</td>
				<td>
					<c:if test="${lzd.zpeCount > 0}">
						<c:choose>
							<c:when test="${lzd.zpeCount != lzd.payCount}">
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">未支付</span>
							</c:when>
							<c:otherwise>
								<span class="label label-success" style="margin-left: 5px;font-size: 90%;font-weight: 400;">已支付</span>
							</c:otherwise>
						</c:choose>
					</c:if>
					<c:if test="${lzd.zpeCount == 0}">
						<span class="label label-default" style="margin-left: 5px;text-align:center;font-size: 90%;font-weight: 400">无专家</span>
					</c:if>
				</td>
				<td>
					<c:choose>
						<c:when test="${lzd.isSubpackage eq '1'}">
							<c:if test="${lzd.ts.trashPro != '0'}">
								<shiro:hasPermission name="zx:proExperts:edit">
			    					<a href="${ctx}/zx/proExperts/form?id=${lzd.id}&sectionId=${lzd.ts.id}">设置评审专家</a>
			    				</shiro:hasPermission>
			    				<shiro:hasPermission name="zx:proExperts:show">
			    					<a href="${ctx}/zx/proExperts/show?id=${lzd.id}&sectionId=${lzd.ts.id}">查看评审专家</a>
			    				</shiro:hasPermission>
							</c:if>
						</c:when>
						<c:otherwise>
							<c:if test="${lzd.trashPro != '0'}">
								<shiro:hasPermission name="zx:proExperts:edit">
			    					<a href="${ctx}/zx/proExperts/form?id=${lzd.id}&sectionId=${lzd.ts.id}">设置评审专家</a>
			    				</shiro:hasPermission>
			    				<shiro:hasPermission name="zx:proExperts:show">
			    					<a href="${ctx}/zx/proExperts/show?id=${lzd.id}&sectionId=${lzd.ts.id}">查看评审专家</a>
			    				</shiro:hasPermission>
							</c:if>
						</c:otherwise>
					</c:choose>
					
    				
				</td>
				
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
	
</body>
</html>